package com.chag.app.biz.dao.gen;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface AppointCatMapper {
    int countByExample(AppointCatCriteria example);

    int deleteByExample(AppointCatCriteria example);

    @Delete({
        "delete from APPOINT_CAT",
        "where APPOINT_CAT_ID = #{appointCatId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer appointCatId);

    @Insert({
        "insert into APPOINT_CAT (APPOINT_CAT_ID, NAME)",
        "values (#{appointCatId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR})"
    })
    int insert(AppointCat record);

    int insertSelective(AppointCat record);

    List<AppointCat> selectByExample(AppointCatCriteria example);

    @Select({
        "select",
        "APPOINT_CAT_ID, NAME",
        "from APPOINT_CAT",
        "where APPOINT_CAT_ID = #{appointCatId,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    AppointCat selectByPrimaryKey(Integer appointCatId);

    int updateByExampleSelective(@Param("record") AppointCat record, @Param("example") AppointCatCriteria example);

    int updateByExample(@Param("record") AppointCat record, @Param("example") AppointCatCriteria example);

    int updateByPrimaryKeySelective(AppointCat record);

    @Update({
        "update APPOINT_CAT",
        "set NAME = #{name,jdbcType=VARCHAR}",
        "where APPOINT_CAT_ID = #{appointCatId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(AppointCat record);
}